package com.example.e_comm.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.time.LocalDateTime;


@Data
@TableName("permissions")
public class Permission {
    @TableId(type = IdType.AUTO)
    private Long id;
    @TableField(value = "perm_name") //数据库字段名为perm_name
    private String permName; //权限名称。例如：READ-读取效果
    @TableField(value = "perm_key")
    private String permKey; //权限校验
    //预留：菜单权限

    @TableLogic(value = "0",delval = "1")
    private Integer deleted;//逻辑删除字段，0：未删除，1：已删除

    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private LocalDateTime createTime = LocalDateTime.now();
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime = LocalDateTime.now();

}
